<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<script type="text/javascript">
function checkInput() {
	if($("input[name=subject]").val() == "") {
		alert("제목을 입력하세요.");
		return false;
	}else if($("textarea[name=content]").val() == "") {
		alert("내용을 입력하세요.");
		return false;
	}
	return true;
}
</script>

</head>
<body>

<h2>운영정책 수정</h2>
<form action="modifyPolicy.ga" method="post" onsubmit="return checkInput()" autocomplete="off">

<input type="hidden" name="policy_no" value="${resultClass.policy_no }"/>

&nbsp; 제목: &nbsp; <input type="text" name="subject" style="width:60%" value="${resultClass.subject }"/>
<br/><br/><br/>

&nbsp; 내용
<br/>
<textarea name="content" rows="20" cols="100" style="resize:none;width:100%;">${resultClass.content }</textarea>

<!-- 버튼 -->
<table width="100%">
    <tr>
        <td align="right">
            <input type="button" value="취소" style="width:100px;height:30px;" onclick="location.href='./policyList.ga'"/>
            <input type="submit" value="수정하기" style="width:100px;height:30px;"/>
        </td>
    </tr>
</table>
</form>

</body>
</html>